app.directive("loginMsg",function(){
    return {
        restrict: 'EA',
        link:function(scope,element,attr){
            scope.$watch("cookie",function(olddata,newdata){
                if(scope.cookie!=null){
                    element.append("<div class='alert alert-danger'>"+scope.cookie+"</div>");
                }
                // setTimeout(function(){
                //     element.children("alert alert-danger").remove();
                // },1000);
            });
        }
    };
});